package com.lkm.market2_0.m_imple.steelyardserver.server.cmd_handle;

import com.lkm.frame.task.ProgressDataImpl;
import com.lkm.market2_0.m_imple.steelyardserver.server.AbsReceiverDataHandle;
import com.lkm.market2_0.m_imple.steelyardserver.server.ReceiveTask;
import com.lkm.market2_0.m.steelyardserver.to.TradeInfoEntity;




public class ReceiverDataTradeInfoHandle extends AbsReceiverDataHandle {

    public ReceiverDataTradeInfoHandle(int length, int type) {
        super(length, type);
        setReadFrameDataSize(32);
    }

    @Override
    public void handleData(ReceiveTask task, byte[] data, int index, int maxLength) {

        TradeInfoEntity tradeInfoEntity=TradeInfoEntity.createByData(data);

        if(tradeInfoEntity!=null) {
            task.progressUpdate(new ProgressDataImpl<Object>(maxLength, index, tradeInfoEntity));
                    
        }
    }
}
